package main.java.game.item.equipableTreasure;

import main.java.game.Battle;
import main.java.game.combatant.Hero;

public class SpecialEquipableTrinketTreasure extends EquipableTrinketTreasure implements SpecialObject{

	
	public SpecialEquipableTrinketTreasure (String name, Integer defenseValue, Integer attackValue, Integer initValue, Integer lpValue,Integer sellingPrice, Integer level){
		super(name,defenseValue,attackValue,initValue,lpValue,sellingPrice, level);
		
	}
	public void equip(Hero hero) {
		super.equip(hero);
		hero.getSpecialObjects().add(this);
		hero.getPlayer().getUsedTreasures().add(this);
		hero.getPlayer().getTreasures().remove(this);
	}

	
	public void unequip(Hero hero) {
		super.unequip(hero);
		hero.getSpecialObjects().remove(this);
		hero.getPlayer().getTreasures().add(this);
		hero.getPlayer().getUsedTreasures().remove(this);
		
	}

	public void useSpecialHability(Battle battle){
		battle.getMonster().setAttack((battle.getMonster().getAttack())/2);
		
	}
	public void stopUsingSpecialHability(Battle battle){
		battle.getMonster().setAttack(battle.getMonster().getInitialAttack());
		
	}
}
